package com.lepu.app.main.activity;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;
import android.view.View;

import com.core.lib.application.BaseFragmentActivity;
import com.core.lib.widget.MyDialog;
import com.eyzhs.app.R;

public class MainEmptyActivity extends BaseFragmentActivity {
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		
		mNeedSwipeBack = false;
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main_empty_activity);
		
		init();
	}

	@Override
	public void onDestroy() {
		super.onDestroy();
	}

	@Override
	public void onBackPressed() {
		finish(true);
	}
	
	private void init()
	{
		
	}
	
	public void addFragment(Fragment fragment) {
		FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
		transaction.add(R.id.emptyActivityContainer, fragment);
		transaction.addToBackStack(null);
		transaction.commit();
	}
	
	@SuppressWarnings("unused")
	private void jumpOneButtonDialog() {
		String message = "";

		MyDialog dialog = new MyDialog(this)
				.setMessage(message)
				.setNegativeButtonSplitImageHide(true)
				.setPositiveButton(R.string.app_ok,
						R.drawable.btn_ok_selector, R.color.color_white,
						new View.OnClickListener() {

							@Override
							public void onClick(View v) {

							}
						});

		dialog.create(null);
		dialog.setCancelable(false);
		dialog.setCanceledOnTouchOutside(false);
		dialog.showMyDialog();
	}
    
    @SuppressWarnings("unused")
	private void jumpTwoButtonDialog() {

		String message = "";
		MyDialog dialog = new MyDialog(this)
				.setMessage(message)
				.setNegativeButton(R.string.app_cancel,
						R.drawable.btn_cancel_selector, R.color.color_white,
						new View.OnClickListener() {

							@Override
							public void onClick(View v) {

								finish(true);
							}
						})
				.setPositiveButton(R.string.app_ok,
						R.drawable.btn_ok_selector, R.color.color_white,
						new View.OnClickListener() {

							@Override
							public void onClick(View v) {

							}
						});

		dialog.create(null);
		dialog.showMyDialog();
	}
}
